#include "ThreadPool.hpp"
#include "Task.hpp"
#include <stdlib.h>
#include <unistd.h>
using namespace ns_task;
using namespace ns_task_queue;

int main()
{
    srand((long long)time(nullptr));
    ThreadPool<Task>* tp = ThreadPool<Task>::GetInstance();
    while(1)
    {
        //网络，不断派发任务
        Task t(rand()%20+1, rand()%10+1, "+-*/%"[rand()%5]);
        tp->PushTask(t);
        sleep(1);
    }
    return 0;
}
